FROM alibaba-atom-cs-registry.cn-beijing.cr.aliyuncs.com/openatom/pnpm:18.20.2-bookworm AS builder

WORKDIR /app

COPY . .

RUN pnpm i && pnpm build

FROM alibaba-atom-cs-registry.cn-beijing.cr.aliyuncs.com/openatom/nginx:1.25.2-alpine3.18

COPY --from=builder /app/build /usr/share/nginx/html

COPY nginx/nginx.prod.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

ENTRYPOINT ["nginx", "-g", "daemon off;"]
